//
//  BaseObject.h
//  QuWanWang
//
//  Created by tony on 15/4/21.
//  Copyright (c) 2015年 tony. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <objc/runtime.h>
@interface BaseObject : NSObject<NSCoding>
//用字典初始化对象
+ (id)objectWithDic:(NSDictionary *)dic;

//用字典初始化对象
- (id)initWithDic:(NSDictionary *)dic;

//用对象初始化对象
- (id)initWithObject:(BaseObject *)obj;

//将对象的属性值转化为字典
- (NSDictionary *)getDictionaryByPropertys;

#pragma mark NSArchiver And NSCoding
//解档
- (instancetype)initWithCoder:(NSCoder *)aDecoder;
//归档
- (void)encodeWithCoder:(NSCoder *)aCoder;
@end

#pragma mark NSObject Utility
@interface NSObject (Utility)
//获得对象的分类
- (NSString *)getClassName;
-(NSString *)getPropertyClassName:(id)obj;
@end